package com.htc.callcare.activities;

import com.htc.callcare.R;
import com.htc.callcare.infrastructure.globalVar;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class HomeScreen extends Activity {
	/** Called when the activity is first created. */
	Button btnRecord;
	Button btnVoiceMail;
	Button btnCallBlock;
	Button btnAuto;
	Button btnFakeCall;
	Button btnSetting;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);
		globalVar.makeDir();
		initView();
		initListener();
	}

	private void initListener() {
		btnRecord.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				startActivity(new Intent(getApplicationContext(),
						RecordActivity.class));
			}
		});

		btnVoiceMail.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub

			}
		});

		btnCallBlock.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub

			}
		});

		btnAuto.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub

			}
		});

		btnFakeCall.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub

			}
		});

		btnSetting.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				startActivity(new Intent(getApplicationContext(),
						SettingActivity.class));
			}
		});
	}

	private void initView() {
		btnRecord = (Button) findViewById(R.id.homeBtnRecord);
		btnVoiceMail = (Button) findViewById(R.id.homeBtnVociemail);
		btnCallBlock = (Button) findViewById(R.id.homeBtnCallBlock);
		btnAuto = (Button) findViewById(R.id.homeBtnAuto);
		btnFakeCall = (Button) findViewById(R.id.homeBtnFakeCall);
		btnSetting = (Button) findViewById(R.id.homeBtnSetting);
	}

}